Skip to content

Update Fly.io config and Dockerfile for optimized resource usage#47

Merged
mattknatt merged 1 commit into
mainfrom
fix/startup
Jun 1, 2026
Merged

Update Fly.io config and Dockerfile for optimized resource usage#47
mattknatt merged 1 commit into
mainfrom
fix/startup

Conversation

@mattknatt

@mattknatt mattknatt commented Jun 1, 2026

Copy link
Copy Markdown
Owner
  • Set auto_stop_machines to false and require at least 1 running machine in fly.toml.
  • Adjust Dockerfile to optimize JVM memory settings with G1GC and RAM limits.

Summary by CodeRabbit

  • Chores
    • Optimized JVM memory allocation and garbage collection settings for enhanced application performance.
    • Updated deployment configuration to ensure continuous service availability by maintaining at least one running instance at all times.

- Set `auto_stop_machines` to false and require at least 1 running machine in `fly.toml`.
- Adjust Dockerfile to optimize JVM memory settings with G1GC and RAM limits.
@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR makes two independent infrastructure configuration changes: JVM runtime tuning in the Docker entrypoint to optimize memory management and garbage collection, and Fly.io deployment settings to prevent machine auto-shutdown and guarantee continuous service availability.

Changes

JVM Runtime Configuration

Layer / File(s) Summary
JVM memory and GC flags
Dockerfile
Runtime ENTRYPOINT adds heap sizing (-Xms128m, -Xmx384m), G1 garbage collector selection (-XX:+UseG1GC), and dynamic RAM percentage tuning (-XX:MaxRAMPercentage=75) to the Java invocation.

Fly.io Machine Management

Layer / File(s) Summary
Machine auto-stop and minimum instances
fly.toml
HTTP service configuration disables auto_stop_machines and sets min_machines_running to 1 to ensure at least one instance remains continuously available.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • mattknatt/boka#44: Modifies min_machines_running value in the same fly.toml [http_service] configuration.
  • mattknatt/boka#43: Updates auto_stop_machines and min_machines_running settings in fly.toml [http_service], overlapping with the machine management changes in this PR.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main changes: updating Fly.io configuration and Dockerfile settings to optimize resource usage through JVM memory flags and machine management settings.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/startup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mattknatt
mattknatt merged commit bb5b9f1 into main Jun 1, 2026
1 of 2 checks passed
@mattknatt
mattknatt deleted the fix/startup branch June 1, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant